this._swipeTracker.connect('begin', this._switchWorkspaceBegin.bind(this));
this._swipeTracker.connect('update', this._switchWorkspaceUpdate.bind(this));
this._swipeTracker.connect('end', this._switchWorkspaceEnd.bind(this));
- this.bind_property('mapped', this._swipeTracker, 'enabled', GObject.BindingFlags.SYNC_CREATE);
+ this.connect('notify::mapped', this._updateSwipeTracker.bind(this));
+
+ this._windowDragBeginId =
+ Main.overview.connect('window-drag-begin',
+ this._windowDragBegin.bind(this));
+ this._windowDragEndId =
+ Main.overview.connect('window-drag-begin',
+ this._windowDragEnd.bind(this));
this._primaryIndex = Main.layoutManager.primaryIndex;
this._workspacesViews = [];
this._scrollTimeoutId = 0;
this._fullGeometry = null;
+ this._inWindowDrag = false;
this._gestureActive = false; // touch(pad) gestures
this._canScroll = true; // limiting scrolling speed
global.window_manager.disconnect(this._switchWorkspaceId);
global.workspace_manager.disconnect(this._reorderWorkspacesdId);
+ Main.overview.disconnect(this._windowDragBeginId);
+ Main.overview.disconnect(this._windowDragEndId);
+ }
+
+ _windowDragBegin() {
+ this._inWindowDrag = true;
+ this._updateSwipeTracker();
+ }
+
+ _windowDragEnd() {
+ this._inWindowDrag = false;
+ this._updateSwipeTracker();
+ }
+
+ _updateSwipeTracker() {
+ this._swipeTracker.enabled = this.mapped && !this._inWindowDrag;
}
_workspacesReordered() {